const express = require("express");

// express 是一个函数
const app = express();

// 监听默认路径
app.get("/", (req, res, next) => {
  res.end("Hello express");
});

app.post("/", (req, res, next) => {
  res.end("Hello express");
});

app.post("/login", (req, res, next) => {
  res.end("欢迎回来");
});

// 开启监听
app.listen(8000, () => {
  console.log("express服务器启动成功~~~");
});
